package com.wlyuan.open.scanner.utils.enums.order;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @description
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum TopOrderTypeEnum implements NamedValue<Integer> {

    /**
     * 新单据
     */
    FOLLOW_ORDER(2, 1, "从单"),
    ;

    private final Integer value;
    private final Integer newValue;
    private final String name;


    private static final Map<Integer, TopOrderTypeEnum> MAP = new NamedValueMap<>(TopOrderTypeEnum.class);

    public static TopOrderTypeEnum fromValue(Integer value) {
        return MAP.get(value);
    }
}
